package com.bprogram.controller;

import com.bprogram.pojo.User;
import com.bprogram.pojo.Video;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.*;

import java.util.List;


@FeignClient(value = "USER")
public interface UserFeign {
    @PostMapping("/user/add")
    void addUser(@RequestBody User user);


    @GetMapping("/user/all")
    public List<User> getAll();


    @GetMapping("/user/getByUserCode")
    public User getUserByUserCode(@RequestParam("userCode") String userCode);

    //获取当前登录用户
    @RequestMapping("/user/getLoginUser")
    public User getLoginUser();

    @GetMapping("/user/getUserAvatarIds")
    public List<User> getUserAvatarIds();


//根据Id找用户
    @GetMapping("/user/get")
    public User getById(@RequestParam("id") Long id);
}
